package de.dhbw_stuttgart.wi2011i.outofapples.logging;

import android.util.Log;

public final class LoggerImpl implements Logger {
	private static final String TAG = "OutOfAPPles"; 

	public void info(String info, Object... args) {
		String message = String.format(info, args);
		
		Log.d(TAG, message);
	}

	public void warning(String warning, Object... args) {
		this.info("WARNING: " + warning, args);
	}

	public void error(String message) {
		this.error(message, null);
	}

	public void error(Exception exception) {
		this.error("Exception occured: ", exception);
	}

	public void error(String message, Exception exception) {
		if (exception == null)
			Log.e(TAG, message);
		else
			Log.e(TAG, message, exception);
	}
}
